<?php #//v.3.3.0
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

require('./includes/config.inc.php');
  
   $query_settings3 = "select * from PHPAUCTIONXL_version_2_0 where id='1'";
                             $query_settings4 =  mysql_query ($query_settings3);
                                $intl_date_time1 = mysql_result($query_settings4,0,"intl_date_time");
                                 $autobidder1 = mysql_result($query_settings4,0,"hide_autobidder");
         $cron = 0;
    while($cron < 60) {
    
    
     $TIME = mktime(date("H")+$SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y"));

$NOW = date("YmdHis",$TIME);

$LAST_FIVE_MINUTES = date("YmdHis", mktime(substr($NOW, 8, 2), substr($NOW, 10, 2), substr($NOW, 12, 2) - 300 , substr($NOW, 4, 2), substr($NOW, 6, 2), substr($NOW, 0, 4)));






  
$query = "select * from PHPAUCTIONXL_auctions2 WHERE closed='0' AND suspended='0' AND starts<='$NOW' order by id";
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);



 $i = 0;
while($i < $num_auction) {
  
  $auction_id = mysql_result($result,$i,"id");
                   
         $query_settings33 = "select dbl_bidding from PHPAUCTIONXL_auctions where id=$auction_id";
                             $query_settings44 =  mysql_query ($query_settings33);
                                $dbl_bidding = mysql_result($query_settings44,0,"dbl_bidding");           
                   
                   
                   
                   
// Get Auction ID







    $jsenddate = " ";
    $jsenddate .= "|";
    $jsenddate .= "A";
      /*
$id2 = $_SESSION["PHPAUCTION_LOGGED_IN"];
 
 if($id2) {
 
  $query = mysql_fetch_array(mysql_query("SELECT bids_remaining FROM PHPAUCTIONXL_users WHERE id=$id2 "));
  
  $jsenddate = " ";
  $jsenddate .= "|";
  $jsenddate .= $query['bids_remaining'];
   
  }
         if(!$id2) {
  
  $jsenddate = " ";   
  $jsenddate .= "|";
    $jsenddate .= "A";
  
  }
           */
           
$jsenddate .= "|";
  
// Create DATE & TIME


$jsenddate .= substr ($NOW, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($NOW, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($NOW, 0, 4);
$jsenddate .= " ";



     
if (substr ($NOW, 8, 2) > 12) {
$jsenddate .= substr ($NOW, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($NOW, 8, 2) != 00){
if (substr ($NOW, 8, 2) < 12) {
$jsenddate .= substr ($NOW, 8, 2);
$jsampm = "AM";
}}
if (substr ($NOW, 8, 2) == 12) {
$jsenddate .= substr ($NOW, 8, 2);
$jsampm = "PM";
}
if (substr ($NOW, 8, 2) == 00) {
$jsenddate .= 12;
$jsampm = "AM";
}



$jsenddate .= ":";
$jsenddate .= substr ($NOW, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($NOW, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;
$jsenddate .= "|";


//GET END TIME


           $reserve_price2 = mysql_result($result,$i,"reserve_price");
             $end_time = mysql_result($result,$i,"ends");
            $start_time  = mysql_result($result,$i,"starts");
               
                
  if ( $start_time < $NOW ) {
  
$jsenddate .= substr ($end_time, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($end_time, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($end_time, 0, 4);
$jsenddate .= " ";



     
if (substr ($end_time, 8, 2) > 12) {
$jsenddate .= substr ($end_time, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($end_time, 8, 2) != 00){
if (substr ($end_time, 8, 2) < 12) {
$jsenddate .= substr ($end_time, 8, 2);
$jsampm = "AM";
}}
if (substr ($end_time, 8, 2) == 12) {
$jsenddate .= substr ($end_time, 8, 2);
$jsampm = "PM";
}
if (substr ($end_time, 8, 2) == 00) {
$jsenddate .= 12;
$jsampm = "AM";
}



$jsenddate .= ":";
$jsenddate .= substr ($end_time, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($end_time, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;
$jsenddate .= "|";
           
             }
           
          if ( $start_time > $NOW ) {
  
$jsenddate .= substr ($start_time, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($start_time, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($start_time, 0, 4);
$jsenddate .= " ";



     
if (substr ($end_time, 8, 2) > 12) {
$jsenddate .= substr ($start_time, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($end_time, 8, 2) != 00){
if (substr ($end_time, 8, 2) < 12) {
$jsenddate .= substr ($start_time, 8, 2);
$jsampm = "AM";
}}
if (substr ($end_time, 8, 2) == 12) {
$jsenddate .= substr ($start_time, 8, 2);
$jsampm = "PM";
}
if (substr ($end_time, 8, 2) == 00) {
$jsenddate .= 12;
$jsampm = "AM";
}



$jsenddate .= ":";
$jsenddate .= substr ($start_time, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($start_time, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;
$jsenddate .= "|";
           
             }   
           
           
 $jsenddate .= $reserve_price2;
$jsenddate .= "|";


// GET COUNTER

$query2 = "SELECT counter as counter from PHPAUCTIONXL_auccounter where auction_id=$auction_id";
$result2 = mysql_query($query2);
$num_auction2 = mysql_num_rows($result2);

 $ii = 0;
while($ii < $num_auction2) {

  $counter = mysql_result($result2,$ii,"counter");

$jsenddate .= $counter;
$jsenddate .= "|";

$ii++;
}





// GET HIGH BIDDER INFO

             
  $high_bidder 	= mysql_result($result,$i,"current_high_bidder");
$jsenddate .= $high_bidder;  
$high_bid 	= mysql_result($result,$i,"current_bid");
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";




// GET # of BIDS
     /*

$query = "select * from PHPAUCTIONXL_bids where auction=$auction_id ORDER BY bid DESC";
$result_numbids = mysql_query ($query);
$num_auction2 = mysql_num_rows($result_numbids);

 $iiiiiiii=0;
 $ii = 0;
             
while($ii < $num_auction2) {

    $high_bidder 	= mysql_result($result_numbids,$ii,"current_high_bidder");
  
  if ( $ii > 0 ) { 
  $iii = $ii - 1;
  $high_bidder2 	= mysql_result($result_numbids,$iii,"current_high_bidder");
  }
$high_bid 	= mysql_result($result_numbids,$ii,"bid");
$ends_date = mysql_result($result_numbids,$ii,"bidwhen");
$auction_id = mysql_result($result_numbids,$ii,"auction");
     
   //$high_bidder2 	= mysql_result($result_numbids,$iii,"current_high_bidder"); 
    
    if ( $high_bidder2 != $high_bidder ) {
    

          $iiiiiiii++;


}
     $ii++;
}

 //echo $iiiiiiii;
$jsenddate .= $iiiiiiii;
$jsenddate .= "|";
*/

       $increment1  = mysql_result($result,$i,"increment");
$iiiiiiii = $high_bid / $increment1;
$jsenddate .= $iiiiiiii;
$jsenddate .= "|";


// GET BID HISTORY

     $query_settings = "select avatar_img from PHPAUCTIONXL_users where nick='$high_bidder'";
                             $query_settings2a =  mysql_query ($query_settings);
                                $avatar_img = mysql_result($query_settings2a,0,"avatar_img");

                                if ( empty($avatar_img) ) {
                                
                                 $avatar_img = "avatar-blank.jpg";
                                 
                                }

$jsenddate .= "images/avatar/";
$jsenddate .= $avatar_img;    
$jsenddate .= "|";    
    
    $query2 = "SELECT * from PHPAUCTIONXL_auction_seats where auctionid=$auction_id";
$result2 = mysql_query($query2);
$num_auction2 = mysql_num_rows($result2);
    if ( $num_auction2 ) {
$jsenddate .= $num_auction2;  
$jsenddate .= "|"; 
}    
     if ( !$num_auction2 ) {
$jsenddate .= 0;  
$jsenddate .= "|"; 
}    
   
      $counter12 = 0;
  
 $query333 = "SELECT bidder,auction,bidwhen FROM PHPAUCTIONXL_bids2 WHERE auction=$auction_id AND bidwhen>$LAST_FIVE_MINUTES GROUP BY bidder"; 

$result333 = mysql_query($query333) or die(mysql_error());

while($row = mysql_fetch_array($result333)){
     $counter12++;
    //          $id2=$row['auction'];

  //  $query435 = mysql_fetch_array(mysql_query("SELECT title FROM PHPAUCTIONXL_auctions WHERE id=$id2"));
  

 //$auctiontitle = stripslashes($query435['title']);



  // print "$counter) AuctionID#$id2 - <a href=\"userbidhistoryauctiondetail.php?user_id=$id&auction_id=$id2\">$auctiontitle</A><BR>";

//	echo $row['bidder']. " - ".$row['auction'];
	//echo "<br />";
	
}    

 $jsenddate .= $counter12;  
$jsenddate .= "|"; 

      



                 


$query222 = "select * from PHPAUCTIONXL_bids where auction='$auction_id' ORDER BY id DESC LIMIT 0,8";
$result_numbids222 = mysql_query ($query222);
$num_auction222 = mysql_num_rows($result_numbids222);
      
      
      
      
      
     if ( $dbl_bidding == 0 ) { 
       
       
        if ( $num_auction222 > 0 ){
 $iii = 0;
while($iii < $num_auction222) {


$high_bidder 	= mysql_result($result_numbids222,$iii,"current_high_bidder");
$high_bid 	= mysql_result($result_numbids222,$iii,"bid");
$ends = mysql_result($result_numbids222,$iii,"bidwhen");
   $proxy = mysql_result($result_numbids222,$iii,"accounttype");
   
    if ( $iii > 0 ) { 
  $iiii = $iii - 1;
  $high_bidder2 	= mysql_result($result_numbids222,$iiii,"current_high_bidder");
  }

  if ( $iii == 0)
  {
     $high_bidder2 	= mysql_result($result_numbids222,$iii,"current_high_bidder");
     $high_bidder2 	.= "xyz";
  }
        if ( $high_bidder2 != $high_bidder ) {
        
     /*   
        if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "<font color=red>*</font>";
        
        
              }
        
        }
        
         */
        
        
    
        if ( $intl_date_time1 != 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 2, 2);
$jsenddate .= " ";



if (substr ($ends, 8, 2) > 12) {
$jsenddate .= substr ($ends, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($ends, 8, 2) != 00) {
if (substr ($ends, 8, 2) < 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}
}
if (substr ($ends, 8, 2) == 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "PM";
}
if (substr ($ends, 8, 2) == 00) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}


$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;
$jsenddate .= "|";


     }

if ( $intl_date_time1 == 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";


$jsenddate .= substr ($ends, 0, 4);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= " ";
$jsenddate .= substr ($ends, 8, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= "|";


     }


        
        if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Autobid";
                    $jsenddate .= "|";
        
              }
              
                           if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|";
         }
         
         
        
        }
        
                if ( $proxy != "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Button";
              $jsenddate .= "|";
        
              }
              
               if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|";
                    
                    }
        
        }





$iii++;




}



  if ( $iii == 0 ) {
        
      /*    if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "<font color=red>*</font>";
        
        
              }
        
        }
           */
        
        
        
                if ( $intl_date_time1 != 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 2, 2);
$jsenddate .= " ";



if (substr ($ends, 8, 2) > 12) {
$jsenddate .= substr ($ends, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($ends, 8, 2) != 00) {
if (substr ($ends, 8, 2) < 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}
}
if (substr ($ends, 8, 2) == 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "PM";
}
if (substr ($ends, 8, 2) == 00) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}


$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;
$jsenddate .= "|";


     }

if ( $intl_date_time1 == 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";


$jsenddate .= substr ($ends, 0, 4);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= " ";
$jsenddate .= substr ($ends, 8, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= "|";


     }


             if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Autobid";
                $jsenddate .= "|";
        
              }
              
              
                   if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|";
         }
        
        }
        
                if ( $proxy != "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Button";
               $jsenddate .= "|";
        
              }
              
               if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|";
                 }
        }





$iii++;
     
}     

if ( $high_bidder2 == $high_bidder ) {
      
  $iii++;
     
  }
 
   }
    }         






      }



        if ( $dbl_bidding == 1 ) { 
       
       
        if ( $num_auction222 > 0 ){
 $iii = 0;
while($iii < $num_auction222) {


$high_bidder 	= mysql_result($result_numbids222,$iii,"current_high_bidder");
$high_bid 	= mysql_result($result_numbids222,$iii,"bid");
$ends = mysql_result($result_numbids222,$iii,"bidwhen");
   $proxy = mysql_result($result_numbids222,$iii,"accounttype");
   
    if ( $iii > 0 ) { 
  $iiii = $iii - 1;
  $high_bidder2 	= mysql_result($result_numbids222,$iiii,"bid");
  }

  if ( $iii == 0)
  {
     $high_bidder2 	= mysql_result($result_numbids222,$iii,"bid");
     $high_bidder2 	.= "xyz";
  }
        if ( $high_bidder2 != $high_bidder ) {
        
     /*   
        if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "<font color=red>*</font>";
        
        
              }
        
        }
          */
        
        
    
        if ( $intl_date_time1 != 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 2, 2);
$jsenddate .= " ";



if (substr ($ends, 8, 2) > 12) {
$jsenddate .= substr ($ends, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($ends, 8, 2) != 00) {
if (substr ($ends, 8, 2) < 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}
}
if (substr ($ends, 8, 2) == 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "PM";
}
if (substr ($ends, 8, 2) == 00) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}


$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;
$jsenddate .= "|";


     }

if ( $intl_date_time1 == 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";


$jsenddate .= substr ($ends, 0, 4);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= " ";
$jsenddate .= substr ($ends, 8, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= "|";


     }




           if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Autobid";
              $jsenddate .= "|";
        
              }
              
                   if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|";
         }
        
        }
        
                if ( $proxy != "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Button";
                $jsenddate .= "|";
        
              }
              
               if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|";
                      }
                    
        
        }




$iii++;




}



  if ( $iii == 0 ) {
        
      /*  if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "<font color=red>*</font>";
        
        
              }
        
        }   */
        
        
        
        
                if ( $intl_date_time1 != 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($ends, 2, 2);
$jsenddate .= " ";



if (substr ($ends, 8, 2) > 12) {
$jsenddate .= substr ($ends, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($ends, 8, 2) != 00) {
if (substr ($ends, 8, 2) < 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}
}
if (substr ($ends, 8, 2) == 12) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "PM";
}
if (substr ($ends, 8, 2) == 00) {
$jsenddate .= substr ($ends, 8, 2);
$jsampm = "AM";
}


$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;
$jsenddate .= "|";


     }

if ( $intl_date_time1 == 1 ) {
        
        
$jsenddate .= $high_bidder;
$jsenddate .= "|";
$jsenddate .= print_money_nosymbol($high_bid);
$jsenddate .= "|";


$jsenddate .= substr ($ends, 0, 4);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 4, 2);
$jsenddate .= "-";
$jsenddate .= substr ($ends, 6, 2);
$jsenddate .= " ";
$jsenddate .= substr ($ends, 8, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($ends, 12, 2);
$jsenddate .= "|";


     }



             if ( $proxy == "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Autobid";
                   $jsenddate .= "|";
        
              }
                     if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|";
         }
        
        
        
        }
        
                if ( $proxy != "proxy" ) {
        
             if ( $autobidder1 == 1 ) {
        
        
        
        
            $jsenddate .= "Button";
              $jsenddate .= "|";
        
              }
              
              if ( $autobidder1 == 0 ) {
        $jsenddate .= "Button";
                    $jsenddate .= "|"; 
              
             }
        }




$iii++;
     
}     

if ( $high_bidder2 == $high_bidder ) {
      
  $iii++;
     
  }
 
   }
    }         






      }










    if($num_auction222 < 1 ){
    
$jsenddate .= "--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|";    
    }

      if( $num_auction222 < 2 ){
    
$jsenddate .= "--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|";    
    }
    
       if( $num_auction222 < 3 ){
    
$jsenddate .= "--|--|--|--|--|--|--|--|--|--|--|--|";    
    }


           if( $num_auction222 < 4 ){
    
$jsenddate .= "--|--|--|--|--|--|--|--|";    
    }
    
            if( $num_auction222 < 5 ){
    
$jsenddate .= "--|--|--|--|";    
    }  
    
    
    
        


   /* 
   $query_settings = "select * from PHPAUCTIONXL_proxybid_settings where id='1'";
                             $query_settings2a =  mysql_query ($query_settings);
                                $activated = mysql_result($query_settings2a,0,"activated");
                                
                                 
        if ( $activated == 1 ) {
    if ( $_SESSION["PHPAUCTION_LOGGED_IN"] ) {
 
 
  $query444 = mysql_fetch_array(mysql_query("SELECT proxybidqty FROM PHPAUCTIONXL_proxybid WHERE itemid=$auction_id AND userid=$id2 "));
  

 $autobidder_bids_remaining = $query444['proxybidqty'];
 
 $jsenddate .= $autobidder_bids_remaining;
  
 }
       if ( !$_SESSION["PHPAUCTION_LOGGED_IN"] ) {
             $jsenddate .= login;  
       }
       
  } 
       if ( $activated == 0 ) {
       
       
                  $jsenddate .= login; 
    
             }
             
             */
             
             
$myFile = "cronfiles/item_page_ajax";
$myFile .= $auction_id;
$myFile .= ".txt";  
    
if ( (substr(sprintf("%o",fileperms($myFile)),-4)) != 0777 ) {

// chmod($myFile,0777);
} 

//echo substr(sprintf("%o",fileperms($myFile)),-4); 
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $jsenddate;
fwrite($fh, $stringData);
fclose($fh);

 // echo $myFile;

    
$i++;
}

           $cron++;
            if ( $cron == 59 )
  
  {
  mysql_close($linktodatabase);
  exit;
    }
          // echo $cron."<BR>";  
              sleep(1);
               //  echo $cron;
               // echo "<BR>";
             
    }     

?>





